package com.chengdu.third.service.Impl;

import com.chengdu.third.dao.IClassifyDao;
import com.chengdu.third.pojo.Classify;
import com.chengdu.third.service.IClassifyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author jingbo
 * @create 2021--08--15  21:28
 */

@Service
public class IClassifyServiceImpl implements IClassifyService {

    @Autowired
    private IClassifyDao iClassifyDao;

    @Override
    public List<Classify> findAll() {
        return iClassifyDao.find();
    }

    @Override
    public void deleteByid(long id) {
       iClassifyDao.delete(id);
    }

    @Override
    public void updateByid(Classify classify) {
             iClassifyDao.update(classify);
    }

    @Override
    public void addclassify(Classify classify) {
         iClassifyDao.add(classify);
    }

    @Override
    public Classify getClassifyById(long id) {

        return iClassifyDao.getClassifyById(id);
    }
}
